home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette: SID64 / SID64.D64 / basic player.64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  1KB  |  27 lines

  1. 100 print chr$(147):print " sidplayer basic player"
  2. 105 print " by craig chamberlain":print
  3. 120 dn=8:sa=780:sx=781:sy=782:sp=783
  4. 130 print " tuning instruments...":print:gosub 57000:rem load sidplayer ml
  5. 200 f$="commodore":la=peek(49)+256*peek(50)+1000:gosub 57500:rem load song
  6. 210 sys hk:rem hook (install)
  7. 220 poke sx,lo:poke sy,hi:sys pl:rem set for playing
  8. 230 k=peek(sx)+256*peek(sy):rem get address of text lines
  9. 240 if peek(k) then print chr$(peek(k));:k=k+1:goto 240:rem print until chr$(0)
  10. 250 poke ss,7:rem start playing music
  11. 260 if peek(ss)and7 goto 260:rem still playing
  12. 270 sys hu:rem hush
  13. 280 sys dp:rem drop (remove)
  14. 290 end
  15. 57000 poke sa,1:poke sx,dn:poke sy,1:sys 65466:f$="sid.obj.64":gosub 59000
  16. 57010 poke sa,0:sys 65493:if peek(sp)and1 goto 59100
  17. 57020 ss=49152:fl=49153:hk=49615:pl=49664:hu=49897:dp=49935:return
  18. 57500 poke sa,1:poke sx,dn:poke sy,0:sys 65466:f$=f$+".mus":gosub 59000
  19. 57510 hi=int(la/256):lo=la-256*hi
  20. 57520 poke sa,0:poke sx,lo:poke sy,hi:sys 65493:if peek(sp)and1 goto 59100
  21. 57530 la=peek(sx)+256*peek(sy):return
  22. 59000 for k=1 to len(f$):poke 584+k,asc(mid$(f$,k)):next
  23. 59010 poke sa,len(f$):poke sx,73:poke sy,2:sys 65469:return
  24. 59100 p=peek(sa):print " error: ";:if p=4 then print "file not found":end
  25. 59110 if p=5 then print "device not present":end
  26. 59120 print st:end
  27.